package com.xmy.cultivate.service;

import com.xmy.cultivate.entity.Quarter;
import com.xmy.cultivate.entity.TranscriptSet;
import com.xmy.cultivate.entity.TranscriptWritePushSet;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.entity.views.ScoreData;
import org.springframework.scheduling.annotation.Async;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hpiggy
 * @since 2024-12-14
 */
public interface ITranscriptWritePushSetService extends IService<TranscriptWritePushSet> {

    List<ScoreData> getReadStudent(Integer yearPart, Integer quarterNum, Integer yearPartWrite, Integer quarterNumWrite, Integer examNum, String isStatistics, List<Integer> yearClassIdList, List<Integer> subjectsIdList);

    /**
     * 单次推送成绩
     * @param writePushSetid
     * @param yearPart
     * @param quarterNum
     * @param examNum
     * @param isStatistics
     * @param quarter
     * @param yearClassIdList
     * @param subjectsIdList
     * @throws InterruptedException
     */
    @Async("onlineAsync")
    void scorePush(Long writePushSetid,Integer yearPart, Integer quarterNum, Integer examNum, String isStatistics, Quarter quarter, List<Integer> yearClassIdList, List<Integer> subjectsIdList) throws InterruptedException;
    /**
     * 定时推送成绩
     * @param id
     * @throws InterruptedException
     */
    @Async("onlineAsync")
    public void scoreScheduledPush(String id, LocalDate pushDate, String pushTime) throws InterruptedException;

}
